import { S } from '../../s';
import { IPSAppView } from '../../app/view/ipsapp-view';
import { IPSPicker } from './ipspicker';
import { PSPickerEditorImpl } from './pspicker-editor-impl';

export class PSPickerImpl extends PSPickerEditorImpl implements IPSPicker {
  get dropDownViewHeight(): number {
    return this.M.dropDownViewHeight;
  }

  get dropDownViewWidth(): number {
    return this.M.dropDownViewWidth;
  }

  protected linkpsappview: IPSAppView;
  getLinkPSAppView(): IPSAppView | null {
    return (
      this.linkpsappview ||
      (this.linkpsappview = this.fillObjectModel(
        S._1e,
        this.M.getLinkPSAppView,
        S._2ee,
      ) as IPSAppView)
    );
  }

  get dropDownView(): boolean {
    return this.M.dropDownView != null ? this.M.dropDownView : false;
  }

  get enableLinkView(): boolean {
    return this.M.enableLinkView != null ? this.M.enableLinkView : false;
  }

  get enablePickupView(): boolean {
    return this.M.enablePickupView;
  }

  get singleSelect(): boolean {
    return this.M.singleSelect;
  }
  get cls(): string {
    return 'PSPickerImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._14b || cls == S._143) return true;
    return super.instanceof(cls);
  }
}
